package com.example.carrent.mapper;

import com.example.carrent.bean.UserOrders;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserOrdersMapper {

    /**
     * 修改订单
     *
     * @return
     */
    @Update("UPDATE user_orders SET payment_status = #{paymentStatus}, order_date = NOW() WHERE order_number = #{orderNumber}")
    int updateById(UserOrders userOrders);

   @Insert("insert into user_course(user_id,course_id) values(#{userId},#{courseId})")
    int insertUserAndCourses(UserOrders userOrders);


}
